<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>$课堂练习$</title>
    <style>
        input {
            color: #cccccc;
        }
    </style>
</head>
<body>
<input type="text" value="请输入搜索内容" id="txt">
<script src="common.js"></script>
<script>
    my$("txt").onfocus = function () {
        if (this.value == "请输入搜索内容") {
            this.value = ""
            this.style.color = "black"
        }

    };
    my$("txt").onblur = function () {
        if (this.value.length == 0) {
            this.value = "请输入搜索内容";
            this.style.color = "#ccc";
        }

    };
</script>
</body>
</html>